package com.wbt.spring.event;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author daojin
 * @date 2022/4/1 11:28 上午
 */
@Component
public class SmsTaskFinishListener implements ApplicationListener<TaskFinishEvent> {

    private String address = "13388889999";

    @Override
    public void onApplicationEvent(TaskFinishEvent event) {
        System.out.println("Send Message to "+address+" Task:"+event.getSource());
    }
}
